﻿namespace Dcms.BLL
{
    using Dcms.IDAL;
    using Dcms.Model;
    using System;
    using System.Collections.Generic;

    public class Dcms_LinkBLL
    {
        private IDcms_LinkDAL lOp = Dcms.DALFactory.DALFactory.CreateDcms_Link();

        public Dcms_LinkModel AddModel(Dcms_LinkModel model)
        {
            return this.lOp.AddModel(model);
        }

        public bool CopyLink(int SourceCateID, int DestCateID)
        {
            return this.lOp.MoveLink(SourceCateID, DestCateID);
        }

        public bool DeleteAllCheck(string AllID)
        {
            return this.lOp.DeleteAllCheck(AllID);
        }

        public void DeleteModelByID(int ID)
        {
            this.lOp.DeleteModelByID(ID);
        }

        public string GetDataCount(string SqlStr)
        {
            return this.lOp.GetDataCount(SqlStr);
        }

        public IList<Dcms_LinkModel> GetDataListByPage(string SqlStr, int CurPage, int PageSize)
        {
            return this.lOp.GetDataListByPage(SqlStr, CurPage, PageSize);
        }

        public Dcms_LinkModel GetModelByID(int ID)
        {
            return this.lOp.GetModelByID(ID);
        }

        public Dcms_LinkModel GetNewModelByCatID(int CatID)
        {
            return this.lOp.GetNewModelByCatID(CatID);
        }

        public bool MoveLink(int SourceCateID, int DestCateID)
        {
            return this.lOp.MoveLink(SourceCateID, DestCateID);
        }

        public Dcms_LinkModel Update(Dcms_LinkModel model)
        {
            return this.lOp.Update(model);
        }

        public bool UpdateState(string AllID, int StateValue)
        {
            return this.lOp.UpdateState(AllID, StateValue);
        }
    }
}

